package ${package.ServiceImpl};

import com.ymk.base.mybatis.DaoRouter;
import com.ymk.base.mybatis.Pagination;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
/**
 * <p>
 * ${table.comment!} 服务实现类
 * </p>
 *
 * @author ${author}
 * @since ${date}
 */
@Service
public class ${table.serviceName} implements ${table.serviceName} {

    @Override
    public ${entity}BO get(Map param) {
    return this.daoRouter.queryForObject("${entity}.load${entity}",param);
    }

    @Override
    public List<${entity}${'BO'}> list(Map param) {
        return this.daoRouter.query("${entity}.load${entity}",param);
    }

    @Override
    public List<${entity}${'BO'}> listForPage(Pagination pagination) {
        return this.daoRouter.query("${entity}.load${entity}ForPage",pagination);
    }

    @Override
    public void post(${entity}BO param) {
        this.daoRouter.insert("A${entity}.insert${entity}",param);
    }

    @Override
    public void update(${entity}BO param) {
        this.daoRouter.update("A${entity}.update${entity}",param);
    }

    @Override
    public void del(${entity}BO param) {
        this.daoRouter.update("A${entity}.del${entity}",param);
    }

    @Autowired
    private DaoRouter daoRouter;

}
